<script language="javascript">
$(function(){
	$('form').form({ 
		success:function(data){
			var data = runJson(data);
			if(data.status == 0){
				alertText(data.info, 'error');
			}else{
				alertText(data.info, 'success', 'back');
			}
		}   
	}); 
});
</script>
<div class="wrapper clear">
	<div class="main">
		<div class="search">
            <div class="searchbox">
 <div class="datagrid-toolbar"> <a href="{:U('Node/index')}" class="easyui-linkbutton" plain="true" iconCls="icon-list">节点管理</a>
  <eq name='ACTION_NAME' value='edit'> | <a href="{:U('Node/add')}" class="easyui-linkbutton" plain="true" iconCls="icon-add">添加新节点</a> </eq>
</div>
<form action="<eq name='ACTION_NAME' value='edit'>{:U('Node/update')}<else />{:U('Node/insert')}</eq>&ajax=true" method="post">
  <table class="tableform" cellpadding="0" cellspacing="0" style="width:900px;">
    <tr>
      <th>节点名称：</th>
      <td><input type="text" value="{$vo.node_name}" id="node_name" name="node_name" style="width:200px;" class="easyui-validatebox input text" required="true" validType="length[2,20]" /></td>
    </tr>
    <tr>
      <th>方法名称：</th>
      <td><input type="text" value="{$vo.action_name}" id="action_name" name="action_name" style="width:200px;" class="easyui-validatebox input text" required="true" validType="length[2,20]" /></td>
    </tr>
    <tr>
      <th>节点标题：</th>
      <td><input type="text" class="easyui-validatebox input text" required="true" validType="length[2,20]" value="{$vo.node_title}" id="node_title" name="node_title" style="width:200px;" /></td>
    </tr>
    <tr>
      <th>上级节点：</th>
      <td><select name="parent_id" id="parent_id" onChange="changeNode($(this))">
          <option value="0">顶级菜单节点</option>
          <volist name="node" id="node"> <option value="{$node.node_id}" 
              
            <if condition="$node['node_id'] eq $vo['parent_id']">selected</if>
            >{$node.node_title}
              
            </option>
          </volist>
        </select></td>
    </tr>
    <tr id="appsid">
      <th>所属应用：</th>
      <td><select name="app_id" id="app_id">
          <option value="0">请选择</option>
          
            
            {$appsTree}
            
          
        </select></td>
    </tr>
    <tr>
      <th>排序：</th>
      <td><input type="text" class="input text" name="sort" id="sort" value="{$vo.sort}" style="width:100px;" /></td>
    </tr>
    <tr>
      <th>备注：</th>
      <td><textarea class="input textarea" name="remark" id="remark" style="width:300px; height:100px;">{$vo.remark}</textarea></td>
    </tr>
    <tr>
      <th>&nbsp;</th>
      <td><eq name='ACTION_NAME' value='edit'>
          <input type="hidden" name="node_id" value="{$vo.node_id}" />
        </eq>
        </td>
    </tr>
  </table>
  <!--添加-->
	<table align="center">
	  <tr>
	    <td align="center">
	    <input class="submit" type="submit" value="保存" id="submits" onclick="return $('form').form('validate')" />
	    <input class="cancel" type="reset" value="取消" />
	    </td>
	  </tr>
	</table>
	<!--end添加-->
</form>
            
            
			</div>
		</div>
	</div>
</div>		
